export class MessageBox {
    static alert_fn:((title: string, msg: string)=>void)|null=null
    static confirm_fn:((title: string, msg: string, cb_submit: (() => void) | null,cb_cancle: (() => void) | null,  cb_close: (() => void) | null)=>void)|null=null

    static alert(message:string|undefined="",title="友情提示"){
        // MessageBox.messagebox_container?.alert(title,message)
        if(import.meta.client){
            MessageBox.alert_fn?.(title,message)
        }
        // MessageBox.alert_fn?.(title,message)
    }
    static confirm(message="",title="", cb_submit: (() => void) | null=null,cb_cancle: (() => void) | null=null,  cb_close: (() => void) | null=null) {
        if(import.meta.client){
            MessageBox.confirm_fn?.(title,message,cb_submit,cb_cancle,cb_close)
        }
        // MessageBox.confirm_fn?.(title,message,cb_submit,cb_cancle,cb_close)
    }

}